Resultados
Tenemos un total de 790 observaciones.
No.
---
title: "Mi Dashboard"
author: "M. Gkoutziomitrou"
date: "`r Sys.Date()`"
output:
flexdashboard::flex_dashboard:
theme: journal
orientation: columns
vertical_layout: fill
source_code: embed
logo: logos/woman.png
favicon: logos/ucm_favicon.png
social: [ "twitter", "facebook", "menu" ]
navbar:
- { title: "Datasets", href: "https://www.ucm.es/la-universidad-en-cifras", align: left }
---
```{r setup, include=FALSE}
library(flexdashboard)
library(readr)
library(ggplot2)
library(DT)
library(plotly)
df <- read_delim("datos_tratados.csv", delim = ";")
df$CURSO <- factor(df$CURSO)
df$CENTRO <- factor(df$CENTRO)
df_1 <- read_delim("datos_tratados_1.csv", delim = ";")
df_1$CURSO <- factor(df_1$CURSO)
df_1$CENTRO <- factor(df_1$CENTRO)
```
# Página 1 {data-icon="fa-table"}
## Columna 1 {data-width="350"}
### Tabla de datos (Cursos, Centros, Alumnos/as)
```{r}
tabla_interactiva <- datatable(df, options = list( pageLength = 25))
tabla_interactiva
```
## Columna 2 {.tabset data-width="650,"}
### Total de alumnos por curso
```{r fig.width=10, fig.height=7}
g1 <-ggplot(df, aes(x = CURSO, y = TOTAL, fill = CURSO)) +
geom_col() +
labs(title = "U.C.M.", x = "Curso", y = "Total de alumnos/as.",
) +
theme(axis.text.x = element_text(angle = 30, vjust = 1, hjust = 1, size=8))
g2 <- ggplotly(g1)
g2
```
### Distribución de los alumnos en la UCM
```{r fig.width=10, fig.height=7}
ggplot(df) +
geom_boxplot(aes(x=TOTAL, y = CENTRO), col = "red" ) +
labs(title = "Distribución de los alumnos que estudian en la UCM",
subtitle = "Gráficos de cajas, (geom_boxplot)",
y = " ",
x = "Número de matriculas por año \n"
)
```
### Comparación por género
```{r fig.width=12, fig.height=11}
ggplot(df_1) +
geom_boxplot(aes(y=CENTRO, x = TOTAL, fill = SEXO) ) +
labs(title = "Distribución de las mujeres y hombres que estudian en la UCM",
x = " ",
y = "Número de estudiantes \n ",
) +
theme(axis.text.x = element_text(),
#arriba(top), izquierda (left), derecha (right)
legend.position = "right",
)
```
# Página 2 {data-icon="fa-file-lines"}
## Columna {data-width="400"}
### Componente 1
### Componente 2
## Columna {.tabset data-width="600,"}
### Texto 2
```{r}
```
### Texto 3
```{r}
```
# Página 3 {data-icon="fa-chart-pie"}
## Columna {data-height="700"}
### Descripción
```{r}
```
## Columna {data-height="300"}
### Total de alumnos por curso
```{r}
g1 <-ggplot(df_1, aes(x = CURSO, y = TOTAL, fill = SEXO)) +
geom_bar(stat = "identity", position = "dodge") +
labs(title = "Total de Alumnos",
x = "CURSO",
y = "Total") +
scale_fill_manual(values = c("Mujer" = "purple", "Hombre" = "green")) +
theme(axis.text.x = element_text(angle = 30, vjust = 1, hjust = 1, size = 8))
g2 <- ggplotly(g1)
g2
```
### Comentarios {data-height=300}
__**Resultados**__
Tenemos un total de `r nrow(df_1)` *observaciones*.
### Otros comentarios {data-height=100}
No.